﻿using System.ComponentModel.DataAnnotations;

namespace HuaweiCloud.Dotnet.Samples.Common
{
    /// <summary>
    /// Id为Int类型的实体类应该都继承于此
    /// </summary>
    public abstract class BaseEntity
    {
        public virtual int Id { get; set; }
    }
    /// <summary>
    /// 非Int类型的实体类继承于此
    /// </summary>
    /// <typeparam name="TKey">主键类型</typeparam>
    public abstract class BaseEntity<TKey> 
    { 
        public virtual TKey Id { get; set; }
    }
}
